package com.wh1200.xmlless.test.model

import com.baomidou.mybatisplus.annotation.FieldFill
import com.baomidou.mybatisplus.annotation.FieldStrategy
import com.baomidou.mybatisplus.annotation.TableField
import jakarta.persistence.Column
import jakarta.persistence.Id
import jakarta.persistence.Table

/**
 *
 * @author 吴昊
 * @date 2024/1/22 19:28
 * @since v0.0.0
 * @version 1.0
 */
@Table(name = "t_test")
class TestModel : com.wh1200.xmlless.test.model.BaseModel() {

  @Id
  var id: Int = 0

  @TableField
  @Column(name = "name")
  var name: String? = null

  var type: Int = 1

  @TableField(insertStrategy = FieldStrategy.ALWAYS)
  var insertAlways: String? = null

  @TableField(insertStrategy = FieldStrategy.NEVER)
  var insertNever: String? = null

  @TableField(insertStrategy = FieldStrategy.NOT_EMPTY)
  var insertNotEmpty: String? = null

  @TableField(insertStrategy = FieldStrategy.NOT_NULL)
  var insertNotNull: String? = null

  @TableField(insertStrategy = FieldStrategy.DEFAULT)
  var insertDefault: String? = null

  @TableField(updateStrategy = FieldStrategy.ALWAYS)
  var updateAlways: String? = null

  @TableField(updateStrategy = FieldStrategy.NEVER)
  var updateNever: String? = null

  @TableField(updateStrategy = FieldStrategy.NOT_EMPTY)
  var updateNotEmpty: String? = null

  @TableField(updateStrategy = FieldStrategy.NOT_NULL)
  var updateNotNull: String? = null

  @TableField(updateStrategy = FieldStrategy.DEFAULT)
  var updateDefault: String? = null

  @TableField(fill = FieldFill.DEFAULT)
  var fillDefault: String? = null

  @TableField(fill = FieldFill.INSERT)
  var fillInsert: String? = null

  @TableField(fill = FieldFill.UPDATE)
  var fillUpdate: String? = null

  @TableField(fill = FieldFill.INSERT_UPDATE)
  var fillInsertUpdate: String? = null

}
